home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / graphics / gnuplot / os2 / gnupmdrv.h < prev    next >
C/C++ Source or Header  |  1993-09-15  |  5KB  |  121 lines

  1. /* gnushell header file */
  2. /*
  3. ** static char RCSid[]="$Id: gnupmdrv.h%v 3.50 1993/07/09 05:35:24 woo Exp $" ;
  4. */
  5.  
  6. /*
  7.  * PM driver for GNUPLOT
  8.  * Copyright (C) 1992   Roger Fearick
  9.  *
  10.  * Permission to use, copy, and distribute this software and its
  11.  * documentation for any purpose with or without fee is hereby granted, 
  12.  * provided that the above copyright notice appear in all copies and 
  13.  * that both that copyright notice and this permission notice appear 
  14.  * in supporting documentation.
  15.  *
  16.  * Permission to modify the software is granted, but not the right to
  17.  * distribute the modified code.  Modifications are to be distributed 
  18.  * as patches to released version.
  19.  *  
  20.  * This software is provided "as is" without express or implied warranty.
  21.  * 
  22.  *
  23.  * AUTHOR
  24.  * 
  25.  *   Gnuplot driver for OS/2:  Roger Fearick
  26.  * 
  27.  * Send your comments or suggestions to 
  28.  *  info-gnuplot@dartmouth.edu.
  29.  * This is a mailing list; to join it send a note to 
  30.  *  info-gnuplot-request@dartmouth.edu.  
  31.  * Send bug reports to
  32.  *  bug-gnuplot@dartmouth.edu.
  33. **/
  34.  
  35.     /* include resource defines */
  36.     
  37. #ifndef DISPDEFS_H
  38. /*#include "dispdefs.h"*/
  39. #include "dialogs.h"
  40. #endif
  41.  
  42. /*==== own window messages  =================================================*/
  43.  
  44. #define WM_GNUPLOT          (WM_USER+20)
  45. #define WM_PAUSEPLOT        (WM_USER+21)
  46. #define WM_PAUSEEND         (WM_USER+22)
  47. #define WM_USER_SET_DATA    (WM_USER+90)
  48. #define WM_USER_GET_DATA    (WM_USER+91)
  49. #define WM_USER_CHGFONT     (WM_USER+10) 
  50. #define WM_USER_PRINT_BEGIN (WM_USER+200)
  51. #define WM_USER_PRINT_OK    (WM_USER+201)
  52. #define WM_USER_PRINT_ERROR (WM_USER+202)
  53. #define WM_USER_DEV_ERROR   (WM_USER+203)
  54. #define WM_USER_PRINT_QBUSY (WM_USER+204)
  55.  
  56. /*==== various names ========================================================*/
  57.  
  58. #define GNUPIPE     "\\pipe\\gnuplot"       /* named pipe to gnuplot */
  59. #define GNUQUEUE    "\\queues\\gnuplot"     /* queue for gnuplot termination */
  60. #define GNUSEM      "\\sem32\\gnuplot.sem"  /* synch gnuplot and gnupmdrv */
  61. #define GNUINI      "gnupmdrv.ini"          /* ini filename */
  62. #define ENVGNUHELP  "GNUHELP"               /* gnuplot help envionment name */
  63. #define ENVGNUPLOT  "GNUPLOT"               /* general gnuplot environment */
  64. #define GNUEXEFILE  "gnuplot.exe"           /* exe file name */
  65. #define GNUHELPFILE "gnuplot.gih"           /* help file name */
  66. #define GNUTERMINIT "GNUTERM=pm"            /* terminal setup string */
  67. #define INITIAL_FONT "12.Helvetica"         /* initial font for plots */
  68. #define APP_NAME     "GnuplotPM"             /* application name */
  69.  
  70.         // profile (ini file) names 
  71. #define INISHELLPOS  "PosShell"
  72. #define INIPLOTPOS   "PosPlot"
  73. #define INIFONT      "DefFont" 
  74. #define INIOPTS      "DefOpts"      
  75.  
  76. /*==== global data  ==========================================================*/
  77.  
  78. HAB         hab ;                   // application anchor block handle 
  79. HWND           hApp ;                  // application window handle 
  80. HWND        hwndFrame ;             // frame window handle 
  81. #define   FONTBUF   256         /* buffer for dropped font namesize */
  82.  
  83. /*==== stuff for querying printer capability =================================*/
  84.  
  85. typedef struct {  //query data for printer setup
  86.     float xsize ;
  87.     float ysize ;
  88.     float xfrac ;
  89.     float yfrac ;
  90.     short caps ;
  91.     char  szFilename[CCHMAXPATHCOMP] ;
  92.     PPRQINFO3 piPrinter ;
  93.     } QPRINT, *PQPRINT ;
  94.  
  95. #define QP_CAPS_NORMAL 0
  96. #define QP_CAPS_FILE   1   /* can print to file */
  97.  
  98. /*==== function declarations =================================================*/
  99.  
  100. short            ScalePS( HPS, PRECTL, USHORT ) ;
  101. void             PlotThings( HPS, long ) ;
  102. int              SetupPrinter( HWND, char*, PPRQINFO3 ) ;
  103. HDC              OpenPrinterDC( HAB, PPRQINFO3, LONG, char* ) ;
  104. int              SetPrinterMode( HWND, PPRQINFO3 ) ;
  105. MPARAM           PrintCmdProc( HWND, ULONG, MPARAM, MPARAM ) ;
  106. MRESULT EXPENTRY PrintDlgProc( HWND, ULONG, MPARAM, MPARAM ) ;
  107. MRESULT EXPENTRY PauseMsgDlgProc( HWND, ULONG, MPARAM, MPARAM ) ;
  108. MRESULT EXPENTRY QFontDlgProc( HWND ,ULONG, MPARAM, MPARAM ) ;
  109. MRESULT EXPENTRY QPrintDlgProc (HWND, ULONG, MPARAM, MPARAM) ;
  110. MRESULT EXPENTRY QPrintersDlgProc ( HWND, ULONG, MPARAM, MPARAM ) ;
  111. MRESULT EXPENTRY DisplayClientWndProc(HWND, ULONG, MPARAM, MPARAM);
  112. MRESULT EXPENTRY NewFrameWndProc(HWND, ULONG, MPARAM, MPARAM) ;
  113. MRESULT EXPENTRY About(HWND, ULONG, MPARAM, MPARAM);
  114.  
  115.         /* own window functions... */
  116. void WinSetDlgItemFloat( HWND, USHORT, float ) ;
  117. void WinSetDlgItemFloatF( HWND, USHORT, int, float ) ;
  118. void WinQueryDlgItemFloat( HWND, USHORT, float* ) ;
  119.  
  120.  
  121.